﻿using System.Collections.Generic;
using System.Threading.Tasks;
using ZilLion.Service.Core.DapperWrapper;
using ZilLion.Service.TaskPlatform.Domain.Entity;

namespace ZilLion.Service.TaskPlatform.Domain.Respository.Interface
{
    public interface ITaskCommandRespository
    {
        /// <summary>
        /// 获取全部command
        /// </summary>
        /// <param name="nodeid"></param>
        /// <returns></returns>
        IEnumerable<TaskConmmandEntity>  GetAllTaskConmmandEntities(string nodeid = null);

        /// <summary>
        /// 获取全部command
        /// </summary>
        /// <returns></returns>
        TaskConmmandEntity GetTaskConmmandById(string conmmandId);
        /// <summary>
        /// 获取全部未处理的节点
        /// </summary>
        /// <param name="nodeid"></param>
        /// <returns></returns>
        IEnumerable<TaskConmmandEntity> GetUnHandleTaskConmmandEntitiesAsync(string nodeid );

        /// <summary>
        /// 保存command
        /// </summary>
        /// <param name="command"></param>
        void SaveTaskConmmandEntity(TaskConmmandEntity command,UnitOfWork unit=null);
    }
}